<!-- xml version="1.0" encoding="utf-8" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<title>The Tutorial Greek Reader</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="flashcard.css" rel="stylesheet" type="text/css">
</head>
<script type="text/javascript">
var sentences = [
  ['οἱ δὲ ἄνδρες εὐμηκέστεροι τῶν Κελτῶν εἰσι καὶ ἧσσον ξανθότριχες,', '<span class="gk">ὁ</span> <span class="gk">ἀνήρ</span>, <span class="gk">ἀνδρός</span><br /><span class="gk">εὐμήκης</span> [<span class="gk">μῆκος</span>, <span class="def">length</span>]<br /><span class="gk">Κελτῶν</span> [<span class="gk">Κελτοί</span>, <span class="def">Celts</span>]', '<span class="gk">ἧσσον</span> <span class="etype">sup.</span> <span class="gk">ἥκιστα</span><br /><span class="gk">ξανθόθριξ</span> <span class="etype">gen.</span> <span class="gk">ξανθότριχος</span> [<span class="gk">ξανθός</span>+<span class="gk">θρίξ</span>, <span class="def">yellow+hair</span>]', 'The men of Britain are taller than the Celti, and not so yellow-haired,'],
  ['χαυνότεροι δὲ τοῖς σώμασι.', '<span class="gk">χαῦνος</span>, -<span class="gk">η</span>, -<span class="gk">ον</span> [<span class="gk">χαίνω</span>/<span class="gk">χάσκω</span>, <span class="def">gape</span>]', '<span class="gk">τὸ</span> <span class="gk">σῶμα</span>, -<span class="gk">ατος</span>', 'although their bodies are of looser build.'],
  ['σημεῖον δὲ τοῦ μεγέθους: ἀντίπαιδας γὰρ εἴδομεν ἡμεῖς ἐν Ῥώμῃ τῶν ὑψηλοτάτων αὐτόθι ὑπερέχοντας καὶ ἡμιποδίῳ,', '<span class="gk">τὸ</span> <span class="gk">σημεῖον</span>, -<span class="gk">ου</span> [<span class="gk">σῆμα</span>, <span class="def">sign</span>]<br /><span class="gk">τὸ</span> <span class="gk">μέγεθος</span> [<span class="gk">μέγας</span>, <span class="def">big</span>]<br /><span class="gk">ἀντίπαις</span> [<span class="gk">ἀντί</span>+<span class="gk">παῖς</span>, <span class="def">as+child</span>]<br /><span class="gk">ὁράω</span>, <span class="gk">ὄψομαι</span>, <span class="gk">εἶδον</span>', '<span class="gk">ἡ</span> <span class="gk">Ῥώμη</span> -<span class="gk">ης</span><br /><span class="gk">ὑψηλός</span>, -<span class="gk">ή</span>, -<span class="gk">όν</span> [<span class="gk">ὕψι</span>, <span class="def">aloft</span>]<br /><span class="gk">αὐτόθι</span>=<span class="gk">αὐτοῦ</span><br /><span class="gk">ὑπερ</span>-<span class="gk">έχω</span>, -<span class="gk">έξω</span>/-<span class="gk">σχήσω</span><br /><span class="gk">τὸ</span> <span class="gk">ἡμι</span>-<span class="gk">πόδιον</span>, -<span class="gk">ου</span> [<span class="gk">ἡμι</span>+<span class="gk">πούς</span>, <span class="def">half+foot</span>]', 'The following is an indication of their size: I myself, in Rome, saw mere lads towering as much as half a foot above the tallest people in the city,'],
  ['βλαισοὺς δὲ καὶ τἆλλα οὐκ εὐγράμμους τῇ συστάσει.', '<span class="gk">βλαισός</span>, -<span class="gk">ή</span>, -<span class="gk">όν</span><br /><span class="gk">ἄλλος</span>, -<span class="gk">η</span>, -<span class="gk">ο</span> <span class="gk">τἆλλα</span>=<span class="gk">τὰ</span> <span class="gk">ἄλλα</span>', '<span class="gk">εὔ</span>-<span class="gk">γραμμος</span>, -<span class="gk">ον</span> [<span class="gk">εὖ</span>+<span class="gk">γράφω</span>, <span class="def">well+draw</span>]<br /> <span class="gk">σύστᾰσις</span>, -<span class="gk">εως</span> [<span class="gk">σύν</span>+<span class="etype">rt.</span> <span class="gk">στα</span>, <span class="def">together+stand</span>]', 'although they were bandy-legged and presented no fair lines anywhere else in their figure.']
];

var shown = 0;

function updateVoc() {
	var i = Math.floor(shown / 4);

	var j = shown % 4;
	var w0, w2;
	if (document.getElementById("efirst").checked) {
		w0 = sentences[i][3];
		w0 = w0.replace(/<br \/>\[[^\]]+\]/, '');
		w2 = sentences[i][0];
		document.getElementById("v1").className = "v3";
		document.getElementById("v3").className = "gk";
	} else {
		w0 = sentences[i][0];
		w2 = sentences[i][3];
		document.getElementById("v1").className = "gk";
		document.getElementById("v3").className = "v3";
	}

	if (j == 0) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = "";
		document.getElementById('v3').innerHTML = "";
	} else if (j == 1) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = sentences[i][1];
		document.getElementById('v3').innerHTML = "";
	} else if (j == 2) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = sentences[i][2];
		document.getElementById('v3').innerHTML = "";
	} else if (j == 3) {
		document.getElementById('v1').innerHTML = w0;
		document.getElementById('v2').innerHTML = '&nbsp;';
		document.getElementById('v3').innerHTML = w2;
	}
}

function next() {
	shown++;
	if (shown > sentences.length * 4 - 1) {
		shown = 0;
		alert('All done!');
	}
	updateVoc();
}

function prev() {
	shown--;
	if (shown < 0) {
		shown = sentences.length * 4 - 1;
		alert('All done!');
	}
	updateVoc();
}


</script>

<body onload="updateVoc()">

<h1 style="text-align:center">The Tutorial Greek Reader</h1>



<div class="center">

<div id="v1" class="gk"></div>
<div id="v2" class="v2">&nbsp;</div>
<div id="v3" class="v3"></div>

<a href="#" class="button" id="btnprev" onclick="prev()" accesskey="p">&lt;&lt;</a>
<a href="#" class="button" id="btnnext" onclick="next()" accesskey="n">&gt;&gt;</a>


</div>
<div class="options">
<label for="efirst"><input id="efirst" name="efirst" type="checkbox" onclick="shown=0;updateVoc();"/>English First</label>
</div>

<span id="dummy"></span>
</body>
</html>
